package com.time.toupdate.Controller;

import com.time.toupdate.pojo.Bank;
import org.jetbrains.annotations.NotNull;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * Author:B
 * http://127.0.0.1:8081/hi
 */
@RestController
@RequestMapping("/")
public class todoController {

    @GetMapping("/hi")
    public String sayhi(@NotNull String workerId) {
        System.out.println(workerId);
        return "hi!!!";
    }

    @PostMapping("user")
    public String sayhi11(@RequestBody @Validated Bank bank) {
        System.out.println(bank);
        System.out.println(bank);
        System.out.println(bank+"--------------------------------");
        return "hi!!!";
    }
}
